package Z09Swing.ZUJian;

import javax.swing.*;

/**
 * @author 李某
 * * @date 2021/10/21
 * *物有本末，事有终始。知其先后者，则近道矣！
 * *荷花开满池塘的前一天还是半塘荷花半塘云。
 */
public class Z07下拉框 {}

class Test7{
    public static void main(String[] args) {
        JFrame  f = new JFrame("Test");
        f.setSize(400,300);
        f.setLocation(580,240);
        f.setLayout(null);

        String[] heros = new String[]{"Hero1","Hero2","Hero3","hero4"};
        JComboBox cb = new JComboBox(heros);

        cb.setBounds(50,50,80,30);

        f.add(cb);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setVisible(true);

    }
}